package com.example.leonard.core.mq.consumer;

import com.example.leonard.core.mq.mqconfig.MQConstants;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = MQConstants.HEADER)
public class HeaderCpnsumer {
    @RabbitHandler
    public void getMessage(String message) {
        System.out.println("接收的消息为" + message);

    }
}
